package uk.co.accolade.clash.core;

public class ClashFilePath implements Comparable<ClashFilePath> {

    private String filePath;

    public ClashFilePath( String filePath ) {
        this.filePath = filePath;
    }

    public String getFilePath() {
        return filePath;
    }

    @Override
    public String toString() {
        return filePath;
    }

    @Override
    public int hashCode() {
        return filePath.hashCode();
    }

    @Override
    public boolean equals( Object o ) {
        if( !(o instanceof ClashFilePath ) ) return false;
        ClashFilePath otherFilePath = (ClashFilePath) o;
        return filePath.equals( otherFilePath.getFilePath() );
    }

    public int compareTo( ClashFilePath otherFilePath ) {
        return filePath.compareTo( otherFilePath.getFilePath() );
    }
}
